package com.tuxianchao.springbootweblogaspeact.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.UUID;

/**
 * created by
 *
 * @author tuxianchao
 * @date 2018/5/12 下午1:01
 */
@RestController
public class TestController {
    private Logger logger = LoggerFactory.getLogger(TestController.class);

    @RequestMapping("/test01")
    public Object test01() {
        HashMap<String, String> map = new HashMap<>();
        map.put("test1", "value1");
        map.put("test2", "value2");
        map.put("test3", "value3");
        return map;
    }

    @RequestMapping("/test2")
    public Object test02() {
        return "111";
    }

    @RequestMapping("/test03")
    public Object test03() {
        ArrayList<String> arrayList = new ArrayList<>();
        for (int i = 0; i < 10000; i++) {
            arrayList.add(UUID.randomUUID().toString());

        }
        return arrayList;
    }
}
